package org.pitest.ant;

/**

 */
public class Filter {
  private PitestAntTask task;
  private String filter;

  public Filter(PitestAntTask task) {
    this.task = task;
  }

  public String getFilter() {
    if (task.getProject() != null) {
      return task.getProject().replaceProperties(filter);
    }

    return filter;
  }

  public void setFilter(String filter) {
    if (filter == null) {
      throw new IllegalArgumentException("Cannot specify a null filter to be excluded.");
    }

    this.filter = filter;
  }


}
